#!/usr/bin/env node

const fs=require('fs'),
      src=process.argv[2],
      dst=process.argv[3];

try{
  //复制文件内容
  let stm = fs.createReadStream(src).pipe(fs.createWriteStream(dst));
  //复制文件权限
  stm.on('close',()=>{
  fs.chmodSync(dst,fs.statSync(src).mode);
  })
}catch(e){
  console.error(e.message);
}


